<template>
  <div class="nav">
    <span
      class="left iconfont"
      :class="{ 'icon-arrow-left-bold': showLeft }"
      @click="fn"
    ></span>
    <span class="title_box">{{ mytitle }}</span>
    <span class="right"></span>
  </div>
</template>

<script>
export default {
  name: "Nav",
  props: ["showLeft", "mytitle"],
  data() {
    return {};
  },
  methods: {
    fn() {
      this.$emit("back");
    },
  },
  components: {},
};
</script>

<style lang="less">
.nav {
  display: flex;
  height: 1.2rem;
  align-items: center;
  background-color: rgb(241, 180, 66);
  color: #fff;
  > span {
    font-size: 0.5rem;
  }
  .title_box {
    flex: auto;
  }
  .left {
    width: 1rem;
    text-align: center;
    font-size: 0.6rem;
    color: #fff;
  }
  .right {
    width: 1rem;
  }
}
</style>